<template>
  <el-card class="content">
    <el-row>
      <el-col :span="4">
        <span>巡查点：</span>
        <el-input
          placeholder="请输入巡查点"
          size="mini"
          style="width: 200px"
          v-model="query.position"
          clearable
        ></el-input>
      </el-col>
      <el-col :span="4">
        <span>日期：</span>
        <el-date-picker
          type="date"
          placeholder="选择日期"
          v-model="query.queryTime"
          value-format="yyyy-MM-dd"
          size="mini"
          :picker-options="pickerOptions0"
        >
        </el-date-picker>
      </el-col>
      <el-col :span="4">
        <el-button
          class="black-button"
          size="mini"
          type="primary"
          @click="getSearch"
          >查询</el-button
        >
      </el-col>
    </el-row>
    <el-table
      :data="handoverReportList"
      stripe
      size="small"
      :header-cell-style="{ 'text-align': 'center' }"
      :cell-style="{ 'text-align': 'center' }"
      class="el-table-box"
    >
      <el-table-column
        prop="position"
        label="巡查点"
        align="center"
        width="150px"
      ></el-table-column>
      <el-table-column
        prop="reportDate"
        label="巡查日期"
        align="center"
      ></el-table-column>
      <el-table-column prop="shiftLevel" label="班别" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.shiftLevel == 1">早</span>
          <span v-if="scope.row.shiftLevel == 2">中</span>
          <span v-if="scope.row.shiftLevel == 3">晚</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="userName"
        label="巡查人"
        align="center"
      ></el-table-column>
      <el-table-column label="巡查项记录" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="updateInfo(scope.row)"
            >查看</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="浸润线高度" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="scaleData(scope.row)"
            >详情</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="干滩长度" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="dryBeachData(scope.row)"
            >详情</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="表面位移" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="surfaceData(scope.row)"
            >详情</el-button
          >
        </template>
      </el-table-column>
      <el-table-column label="外坡比" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="outerSlopeData(scope.row)"
            >详情</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <el-row type="flex" justify="end">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="query.page"
        :page-sizes="[10, 15]"
        :page-size="query.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
    </el-row>
    <!-- 巡查项记录弹窗 -->
    <el-dialog title="巡查项记录详情" :visible.sync="dialogVisible" width="35%">
      <table style="display: block; max-height: 600px; overflow-y: auto">
        <thead>
          <tr>
            <th width="200px">巡查项目</th>
            <th>运行情况</th>
            <th width="200px">异常照片</th>
            <th>异常描述</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="item in searchList" :key="item.alarmId">
            <td>{{ item.alarmName }}</td>
            <td v-if="item.alarmStatus == 0">正常</td>
            <td v-if="item.alarmStatus == 1">异常</td>
            <td v-if="item.alarmStatus == 0" class="imgNull"></td>
            <td v-if="item.alarmStatus == 1">
              <img :src="imgUrl + item.alarmImage" />
            </td>
            <td>{{ item.alarmDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.blastId">
            <td>{{ item.blastName }}</td>
            <td v-if="item.blastStatus == 0">正常</td>
            <td v-if="item.blastStatus == 1">异常</td>
            <td v-if="item.blastStatus == 0" class="imgNull"></td>
            <td v-if="item.blastStatus == 1">
              <img :src="imgUrl + item.blastImage" />
            </td>
            <td>{{ item.blastDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.communicationId">
            <td>{{ item.communicationName }}</td>
            <td v-if="item.communicationStatus == 0">正常</td>
            <td v-if="item.communicationStatus == 1">异常</td>
            <td v-if="item.communicationStatus == 0" class="imgNull"></td>
            <td v-if="item.communicationStatus == 1">
              <img :src="imgUrl + item.communicationImage" />
            </td>
            <td>{{ item.communicationDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.crackId">
            <td>{{ item.crackName }}</td>
            <td v-if="item.crackStatus == 0">正常</td>
            <td v-if="item.crackStatus == 1">异常</td>
            <td v-if="item.crackStatus == 0" class="imgNull"></td>
            <td v-if="item.crackStatus == 1">
              <img :src="imgUrl + item.crackImage" />
            </td>
            <td>{{ item.crackDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.damSurfaceId">
            <td>{{ item.damSurfaceName }}</td>
            <td v-if="item.damSurfaceStatus == 0">正常</td>
            <td v-if="item.damSurfaceStatus == 1">异常</td>
            <td v-if="item.damSurfaceStatus == 0" class="imgNull"></td>
            <td v-if="item.damSurfaceStatus == 1">
              <img :src="imgUrl + item.damSurfaceImage" />
            </td>
            <td>{{ item.damSurfaceDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.debrisFlowId">
            <td>{{ item.debrisFlowName }}</td>
            <td v-if="item.debrisFlowStatus == 0">正常</td>
            <td v-if="item.debrisFlowStatus == 1">异常</td>
            <td v-if="item.debrisFlowStatus == 0" class="imgNull"></td>
            <td v-if="item.debrisFlowStatus == 1">
              <img :src="imgUrl + item.debrisFlowImage" />
            </td>
            <td>{{ item.debrisFlowDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.deviceId">
            <td>{{ item.deviceName }}</td>
            <td v-if="item.deviceStatus == 0">正常</td>
            <td v-if="item.deviceStatus == 1">异常</td>
            <td v-if="item.deviceStatus == 0" class="imgNull"></td>
            <td v-if="item.deviceStatus == 1">
              <img :src="imgUrl + item.deviceImage" />
            </td>
            <td>{{ item.deviceDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.drainageId">
            <td>{{ item.drainageName }}</td>
            <td v-if="item.drainageStatus == 0">正常</td>
            <td v-if="item.drainageStatus == 1">异常</td>
            <td v-if="item.drainageStatus == 0" class="imgNull"></td>
            <td v-if="item.drainageStatus == 1">
              <img :src="imgUrl + item.drainageImage" />
            </td>
            <td>{{ item.drainageDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.foreignTailingId">
            <td>{{ item.foreignTailingName }}</td>
            <td v-if="item.foreignTailingStatus == 0">正常</td>
            <td v-if="item.foreignTailingStatus == 1">异常</td>
            <td v-if="item.foreignTailingStatus == 0" class="imgNull"></td>
            <td v-if="item.foreignTailingStatus == 1">
              <img :src="imgUrl + item.foreignTailingImage" />
            </td>
          </tr>
          <tr v-for="item in searchList" :key="item.landslideId">
            <td>{{ item.landslideName }}</td>
            <td v-if="item.landslideStatus == 0">正常</td>
            <td v-if="item.landslideStatus == 1">异常</td>
            <td v-if="item.landslideStatus == 0" class="imgNull"></td>
            <td v-if="item.landslideStatus == 1">
              <img :src="imgUrl + item.landslideImage" />
            </td>
            <td>{{ item.landslideDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.leakageId">
            <td>{{ item.leakageName }}</td>
            <td v-if="item.leakageStatus == 0">正常</td>
            <td v-if="item.leakageStatus == 1">异常</td>
            <td v-if="item.leakageStatus == 0" class="imgNull"></td>
            <td v-if="item.leakageStatus == 1">
              <img :src="imgUrl + item.leakageImage" />
            </td>
            <td>{{ item.leakageDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.mountainId">
            <td>{{ item.mountainName }}</td>
            <td v-if="item.mountainStatus == 0">正常</td>
            <td v-if="item.mountainStatus == 1">异常</td>
            <td v-if="item.mountainStatus == 0" class="imgNull"></td>
            <td v-if="item.mountainStatus == 1">
              <img :src="imgUrl + item.mountainImage" />
            </td>
            <td>{{ item.mountainDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.outerSlopeId">
            <td>{{ item.outerSlopeName }}</td>
            <td v-if="item.outerSlopeStatus == 0">正常</td>
            <td v-if="item.outerSlopeStatus == 1">异常</td>
            <td v-if="item.outerSlopeStatus == 0" class="imgNull"></td>
            <td v-if="item.outerSlopeStatus == 1">
              <img :src="imgUrl + item.outerSlopeImage" />
            </td>
            <td>{{ item.outerSlopeDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.pastureId">
            <td>{{ item.pastureName }}</td>
            <td v-if="item.pastureStatus == 0">正常</td>
            <td v-if="item.pastureStatus == 1">异常</td>
            <td v-if="item.pastureStatus == 0" class="imgNull"></td>
            <td v-if="item.pastureStatus == 1">
              <img :src="imgUrl + item.pastureImage" />
            </td>
            <td>{{ item.pastureDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.peripheryId">
            <td>{{ item.peripheryName }}</td>
            <td v-if="item.peripheryStatus == 0">正常</td>
            <td v-if="item.peripheryStatus == 1">异常</td>
            <td v-if="item.peripheryStatus == 0" class="imgNull"></td>
            <td v-if="item.peripheryStatus == 1">
              <img :src="imgUrl + item.peripheryImage" />
              " />
            </td>
            <td>{{ item.peripherynDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.searchlightId">
            <td>{{ item.searchlightName }}</td>
            <td v-if="item.searchlightStatus == 0">正常</td>
            <td v-if="item.searchlightStatus == 1">异常</td>
            <td v-if="item.searchlightStatus == 0" class="imgNull"></td>
            <td v-if="item.searchlightStatus == 1">
              <img :src="imgUrl + item.searchlightImage" />
            </td>
            <td>{{ item.searchlightDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.tailingRecoveryId">
            <td>{{ item.tailingRecoveryName }}</td>
            <td v-if="item.tailingRecoveryStatus == 0">正常</td>
            <td v-if="item.tailingRecoveryStatus == 1">异常</td>
            <td v-if="item.tailingRecoveryStatus == 0" class="imgNull"></td>
            <td v-if="item.tailingRecoveryStatus == 1">
              <img :src="imgUrl + item.tailingRecoveryImage" />
            </td>
            <td>{{ item.tailingRecoveryDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.vegetationId">
            <td>{{ item.vegetationName }}</td>
            <td v-if="item.vegetationStatus == 0">正常</td>
            <td v-if="item.vegetationStatus == 1">异常</td>
            <td v-if="item.vegetationStatus == 0" class="imgNull"></td>
            <td v-if="item.vegetationStatus == 1">
              <img :src="imgUrl + item.vegetationImage" />
            </td>
            <td>{{ item.vegetationDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.wasteRockId">
            <td>{{ item.wasteRockName }}</td>
            <td v-if="item.wasteRockStatus == 0">正常</td>
            <td v-if="item.wasteRockStatus == 1">异常</td>
            <td v-if="item.wasteRockStatus == 0" class="imgNull"></td>
            <td v-if="item.wasteRockStatus == 1">
              <img :src="imgUrl + item.wasteRockImage" />
            </td>
            <td>{{ item.wasteRockDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.waterInletId">
            <td>{{ item.waterInletName }}</td>
            <td v-if="item.waterInletStatus == 0">正常</td>
            <td v-if="item.waterInletStatus == 1">异常</td>
            <td v-if="item.waterInletStatus == 0" class="imgNull"></td>
            <td v-if="item.waterInletStatus == 1">
              <img :src="imgUrl + item.waterInletImage" />
            </td>
            <td>{{ item.waterInletDesc }}</td>
          </tr>
          <tr v-for="item in searchList" :key="item.waterOutletId">
            <td>{{ item.waterOutletName }}</td>
            <td v-if="item.waterOutletStatus == 0">正常</td>
            <td v-if="item.waterOutletStatus == 1">异常</td>
            <td v-if="item.waterOutletStatus == 0" class="imgNull"></td>
            <td v-if="item.waterOutletStatus == 1">
              <img :src="imgUrl + item.waterOutletImage" />
            </td>
            <td>{{ item.waterOutletDesc }}</td>
          </tr>
        </tbody>
      </table>
    </el-dialog>
    <!-- 浸润线高度详情 -->
    <el-dialog
      title="浸润线高度详情"
      :visible.sync="scaleLineDialogVisible"
      width="30%"
    >
      <el-table
        :data="scaleLineHeightList"
        stripe
        style="width: 100%; display: block; max-height: 60vh; overflow-y: auto"
      >
        <el-table-column prop="testName" label="测点名称"> </el-table-column>
        <el-table-column prop="testDate" label="数值"> </el-table-column>
      </el-table>
    </el-dialog>
    <!-- 干滩长度详情 -->
    <el-dialog
      title="干滩长度详情"
      :visible.sync="dryBeachLengthDialogVisible"
      width="30%"
    >
      <el-table
        :data="dryBeachLengthList"
        stripe
        style="width: 100%; display: block; max-height: 60vh; overflow-y: auto"
      >
        <el-table-column prop="testName" label="测点名称"> </el-table-column>
        <el-table-column prop="testDate" label="数值"> </el-table-column>
      </el-table>
    </el-dialog>
    <!-- 表面位移弹窗 -->
    <el-dialog
      title="表面位移详情"
      :visible.sync="surfaceDisplacementDialogVisible"
      width="30%"
    >
      <el-table
        :data="surfaceDisplacementList"
        stripe
        style="width: 100%; display: block; max-height: 60vh; overflow-y: auto"
      >
        <el-table-column prop="monitorName" label="测点名称"> </el-table-column>
        <el-table-column prop="gxdata" label="X(m)"> </el-table-column>
        <el-table-column prop="gydata" label="Y(m)"> </el-table-column>
        <el-table-column prop="dhdata" label="H(m)"> </el-table-column>
      </el-table>
    </el-dialog>
    <!-- 外坡比详情 -->
    <el-dialog
      title="外坡比详情"
      :visible.sync="outerSlopeDialogVisible"
      width="30%"
    >
      <el-table
        :data="outerSlopeRatioList"
        stripe
        style="
          width: 100%;
          margin-top: -40px;
          display: block;
          max-height: 60vh;
          overflow-y: auto;
        "
      >
        <el-table-column prop="testName"> </el-table-column>
        <el-table-column prop="testData"> </el-table-column>
      </el-table>
    </el-dialog>
  </el-card>
</template>
<script>
import { getSafetyInspectorListByPage, imgUrl } from "../../../api/api";
export default {
  name: "ComprehensiveInspections",
  data() {
    return {
      pickerOptions0: {
        disabledDate(time) {
          return time.getTime() > Date.now(); //如果没有后面的-8.64e6就是不可以选择今天的
        },
      },
      query: {
        page: 1,
        pagesize: 10,
        position: "",
        queryTime: "",
      },
      imgUrl,
      total: null,
      handoverReportList: [],
      // 巡查项列表
      searchList: [],
      dialogVisible: false,
      // 浸润线高度列表
      scaleLineHeightList: [],
      scaleLineDialogVisible: false,
      // 干滩长度列表
      dryBeachLengthList: [],
      dryBeachLengthDialogVisible: false,
      // 表面位移列表
      surfaceDisplacementList: [],
      surfaceDisplacementDialogVisible: false,
      // 外坡比
      outerSlopeRatioList: [],
      outerSlopeDialogVisible: false,
    };
  },
  created() {
    this.getHandoverReportList();
  },
  methods: {
    async getHandoverReportList() {
      const res = await getSafetyInspectorListByPage({
        pageCount: this.query.page,
        pageSize: this.query.pagesize,
        inspectionType: "7",
      });
      if (res.resultCode == "200") {
        this.handoverReportList = res.parameter.list;
        this.total = res.parameter.total;
      }
      if (res.resultCode !== "200") {
        this.$message({
          message: "暂无数据",
          offset: 400,
          duration: 1000,
        });
        this.handoverReportList = [];
      }
    },
    // 监听 pagesize 改变的事件
    handleSizeChange(val) {
      this.query.pagesize = val;
      this.getHandoverReportList();
    },
    // 监听 页码值 改变的事件
    handleCurrentChange(val) {
      this.query.page = val;
      this.getHandoverReportList();
    },
    // 查看详情
    async getSearch() {
      const res = await getSafetyInspectorListByPage({
        pageCount: this.query.page,
        pageSize: this.query.pagesize,
        inspectionType: "7",
        position: this.query.position,
        queryDate: this.query.queryTime,
      });
      console.log(res);
      if (res.resultCode == "200") {
        this.$message.success({
          message: "成功查询数据",
          offset: 400,
          duration: 1000,
        });
        this.handoverReportList = res.parameter.list;
        this.total = res.parameter.total;
      } else {
        this.$message({
          message: "暂无数据",
          offset: 400,
          duration: 1000,
        });
        this.handoverReportList = [];
      }
    },
    updateInfo(row) {
      this.searchList = [];
      let obj = {};
      if (row.alarmStatus == 1) {
        obj["alarmStatus"] = row.alarmStatus;
        obj["alarmName"] = "报警器状况";
        obj["alarmId"] = 1;
        obj["alarmImage"] = row.alarmImage;
        obj["alarmDesc"] = row.alarmDesc;
      } else {
        obj["alarmName"] = "报警器状况";
        obj["alarmStatus"] = 0;
        obj["alarmId"] = 1;
      }
      if (row.blastStatus == 1) {
        obj["blastStatus"] = row.blastStatus;
        obj["blastName"] = "爆破、采石和建筑、违章";
        obj["blastId"] = 2;
        obj["blastImage"] = row.blastImage;
        obj["blastDesc"] = row.blastDesc;
      } else {
        obj["blastStatus"] = 0;
        obj["blastName"] = "爆破、采石和建筑、违章";
        obj["blastId"] = 2;
      }
      if (row.communicationStatus == 1) {
        obj["communicationStatus"] = row.communicationStatus;
        obj["communicationName"] = "通信电话状况";
        obj["communicationId"] = 3;
        obj["communicationImage"] = row.communicationImage;
        obj["communicationDesc"] = row.communicationDesc;
      } else {
        obj["communicationStatus"] = 0;
        obj["communicationName"] = "通信电话状况";
        obj["communicationId"] = 3;
      }
      if (row.crackStatus == 1) {
        obj["crackStatus"] = row.crackStatus;
        obj["crackName"] = "纵、横向裂缝";
        obj["crackId"] = 4;
        obj["crackImage"] = row.crackImage;
        obj["crackDesc"] = row.crackDesc;
      } else {
        obj["crackStatus"] = 0;
        obj["crackName"] = "纵、横向裂缝";
        obj["crackId"] = 4;
      }
      if (row.damSurfaceStatus == 1) {
        obj["damSurfaceStatus"] = row.damSurfaceStatus;
        obj["damSurfaceName"] = "坝面统运行情况";
        obj["damSurfaceId"] = 5;
        obj["damSurfaceImage"] = row.damSurfaceImage;
        obj["damSurfaceDesc"] = row.damSurfaceDesc;
      } else {
        obj["damSurfaceStatus"] = 0;
        obj["damSurfaceName"] = "坝面统运行情况";
        obj["damSurfaceId"] = 5;
      }
      if (row.debrisFlowStatus == 1) {
        obj["debrisFlowStatus"] = row.debrisFlowStatus;
        obj["debrisFlowName"] = "泥石流和溶洞等情况";
        obj["debrisFlowId"] = 6;
        obj["debrisFlowImage"] = row.debrisFlowImage;
        obj["debrisFlowDesc"] = row.debrisFlowDesc;
      } else {
        obj["debrisFlowStatus"] = 0;
        obj["debrisFlowName"] = "泥石流和溶洞等情况";
        obj["debrisFlowId"] = 6;
      }
      if (row.deviceStatus == 1) {
        obj["deviceStatus"] = row.deviceStatus;
        obj["deviceName"] = "输送设施设备状况";
        obj["deviceId"] = 7;
        obj["deviceImage"] = row.deviceImage;
        obj["deviceDesc"] = row.deviceDesc;
      } else {
        obj["deviceStatus"] = 0;
        obj["deviceName"] = "输送设施设备状况";
        obj["deviceId"] = 7;
      }
      if (row.drainageStatus == 1) {
        obj["drainageStatus"] = row.drainageStatus;
        obj["drainageName"] = "排渗设施状况";
        obj["drainageId"] = 8;
        obj["drainageImage"] = row.drainageImage;
        obj["drainageDesc"] = row.drainageDesc;
      } else {
        obj["drainageStatus"] = 0;
        obj["drainageName"] = "排渗设施状况";
        obj["drainageId"] = 8;
      }
      if (row.emergencySuppliesStatus == 1) {
        obj["emergencySuppliesStatus"] = row.emergencySuppliesStatus;
        obj["emergencySuppliesName"] = "应急物质状况";
        obj["emergencySuppliesId"] = 9;
        obj["emergencySuppliesImage"] = row.emergencySuppliesImage;
        obj["emergencySuppliesDesc"] = row.emergencySuppliesDesc;
      } else {
        obj["emergencySuppliesStatus"] = 0;
        obj["emergencySuppliesName"] = "应急物质状况";
        obj["emergencySuppliesId"] = 9;
      }
      if (row.foreignTailingStatus == 1) {
        obj["foreignTailingStatus"] = row.foreignTailingStatus;
        obj["foreignTailingName"] = "外来尾矿影响";
        obj["foreignTailingId"] = 10;
        obj["foreignTailingImage"] = row.drainageImage;
        obj["foreignTailingDesc"] = row.drainageDesc;
      } else {
        obj["foreignTailingStatus"] = 0;
        obj["foreignTailingName"] = "外来尾矿影响";
        obj["foreignTailingId"] = 10;
      }
      if (row.insideFloodDischargeStatus == 1) {
        obj["insideFloodDischargeStatus"] = row.insideFloodDischargeStatus;
        obj["insideFloodDischargeName"] = "库内排洪系统状况";
        obj["insideFloodDischargeId"] = 11;
        obj["insideFloodDischargeImage"] = row.insideFloodDischargeImage;
        obj["insideFloodDischargeDesc"] = row.insideFloodDischargeDesc;
      } else {
        obj["insideFloodDischargeStatus"] = 0;
        obj["insideFloodDischargeName"] = "库内排洪系统状况";
        obj["insideFloodDischargeId"] = 11;
      }
      if (row.landslideStatus == 1) {
        obj["landslideStatus"] = row.landslideStatus;
        obj["landslideName"] = "滑坡";
        obj["landslideId"] = 12;
        obj["landslideImage"] = row.landslideImage;
        obj["landslideDesc"] = row.landslideDesc;
      } else {
        obj["landslideStatus"] = 0;
        obj["landslideName"] = "滑坡";
        obj["landslideId"] = 12;
      }
      if (row.leakageStatus == 1) {
        obj["leakageStatus"] = row.leakageStatus;
        obj["leakageName"] = "坝坡渗漏状况";
        obj["leakageId"] = 13;
        obj["leakageImage"] = row.leakageImage;
        obj["leakageDesc"] = row.leakageDesc;
      } else {
        obj["leakageStatus"] = 0;
        obj["leakageName"] = "坝坡渗漏状况";
        obj["leakageId"] = 13;
      }
      if (row.mountainStatus == 1) {
        obj["mountainStatus"] = row.mountainStatus;
        obj["mountainName"] = "山体滑坡、塔防情况";
        obj["mountainId"] = 14;
        obj["mountainImage"] = row.mountainImage;
        obj["mountainDesc"] = row.mountainDesc;
      } else {
        obj["mountainStatus"] = 0;
        obj["mountainName"] = "山体滑坡、塔防情况";
        obj["mountainId"] = 14;
      }
      if (row.outerSlopeStatus == 1) {
        obj["outerSlopeStatus"] = row.outerSlopeStatus;
        obj["outerSlopeName"] = "外坡突变";
        obj["outerSlopeId"] = 15;
        obj["outerSlopeImage"] = row.outerSlopeImage;
        obj["outerSlopeDesc"] = row.outerSlopeDesc;
      } else {
        obj["outerSlopeStatus"] = 0;
        obj["outerSlopeName"] = "外坡突变";
        obj["outerSlopeId"] = 15;
      }
      if (row.pastureStatus == 1) {
        obj["pastureStatus"] = row.pastureStatus;
        obj["pastureName"] = "放牧和开垦现象";
        obj["pastureId"] = 16;
        obj["pastureImage"] = row.pastureImage;
        obj["pastureDesc"] = row.pastureDesc;
      } else {
        obj["pastureStatus"] = 0;
        obj["pastureName"] = "放牧和开垦现象";
        obj["pastureId"] = 16;
      }
      if (row.peripheryStatus == 1) {
        obj["peripheryStatus"] = row.peripheryStatus;
        obj["peripheryName"] = "周边运行情况";
        obj["peripheryId"] = 17;
        obj["peripheryImage"] = row.peripheryImage;
        obj["peripherynDesc"] = row.peripheryDesc;
      } else {
        obj["peripheryStatus"] = 0;
        obj["peripheryName"] = "周边运行情况";
        obj["peripheryId"] = 17;
      }
      if (row.searchlightStatus == 1) {
        obj["searchlightStatus"] = row.searchlightStatus;
        obj["searchlightName"] = "探照灯状况";
        obj["searchlightId"] = 18;
        obj["searchlightImage"] = row.searchlightImage;
        obj["searchlightDesc"] = row.searchlightDesc;
      } else {
        obj["searchlightStatus"] = 0;
        obj["searchlightName"] = "探照灯状况";
        obj["searchlightId"] = 18;
      }
      if (row.tailingRecoveryStatus == 1) {
        obj["tailingRecoveryStatus"] = row.tailingRecoveryStatus;
        obj["tailingRecoveryName"] = "尾矿回采";
        obj["tailingRecoveryId"] = 19;
        obj["tailingRecoveryImage"] = row.tailingRecoveryImage;
        obj["tailingRecoveryDesc"] = row.tailingRecoveryDesc;
      } else {
        obj["tailingRecoveryStatus"] = 0;
        obj["tailingRecoveryName"] = "尾矿回采";
        obj["tailingRecoveryId"] = 19;
      }
      if (row.vegetationStatus == 1) {
        obj["vegetationStatus"] = row.vegetationStatus;
        obj["vegetationName"] = "植被破坏";
        obj["vegetationId"] = 20;
        obj["vegetationImage"] = row.vegetationImage;
        obj["vegetationDesc"] = row.vegetationDesc;
      } else {
        obj["vegetationStatus"] = 0;
        obj["vegetationName"] = "植被破坏";
        obj["vegetationId"] = 20;
      }
      if (row.wasteRockStatus == 1) {
        obj["wasteRockStatus"] = row.wasteRockStatus;
        obj["wasteRockName"] = "外来尾矿、废石情况";
        obj["wasteRockId"] = 21;
        obj["wasteRockImage"] = row.wasteRockImage;
        obj["wasteRockDesc"] = row.wasteRockDesc;
      } else {
        obj["wasteRockStatus"] = 0;
        obj["wasteRockName"] = "外来尾矿、废石情况";
        obj["wasteRockId"] = 21;
      }
      if (row.waterInletStatus == 1) {
        obj["waterInletStatus"] = row.waterInletStatus;
        obj["waterInletName"] = "库内进水口运行情况";
        obj["waterInletId"] = 22;
        obj["waterInletImage"] = row.waterInletImage;
        obj["waterInletDesc"] = row.waterInletDesc;
      } else {
        obj["waterInletStatus"] = 0;
        obj["waterInletName"] = "库内进水口运行情况";
        obj["waterInletId"] = 22;
      }
      if (row.waterOutletStatus == 1) {
        obj["waterOutletStatus"] = row.waterOutletStatus;
        obj["waterOutletName"] = "库内出水口运行情况";
        obj["waterOutletId"] = 23;
        obj["waterOutletImage"] = row.waterOutletImage;
        obj["waterOutletDesc"] = row.waterOutletDesc;
      } else {
        obj["waterOutletStatus"] = 0;
        obj["waterOutletName"] = "库内出水口运行情况";
        obj["waterOutletId"] = 23;
      }
      this.searchList.push(obj);
      this.dialogVisible = true;
    },
    scaleData(row) {
      this.scaleLineHeightList = [];
      if (row.scaleLineHeight !== null) {
        let ele = row.scaleLineHeight.split("||");
        for (let i = 0; i < ele.length; i++) {
          let e = ele[i].split(":");
          let obj = {};
          obj.testCode = e[0];
          obj.testName = e[1];
          obj.testDate = e[2];
          this.scaleLineHeightList.push(obj);
        }
        this.scaleLineDialogVisible = true;
      } else {
        this.scaleLineHeightList = [];
      }
    },
    dryBeachData(row) {
      this.dryBeachLengthList = [];
      if (row.dryBeachLength !== null) {
        let ele = row.dryBeachLength.split("||");
        for (let j = 0; j < ele.length; j++) {
          let e = ele[j].split(":");
          let obj = {};
          obj.testCode = e[0];
          obj.testName = e[1];
          obj.testDate = e[2];
          this.dryBeachLengthList.push(obj);
        }
        this.dryBeachLengthDialogVisible = true;
      } else {
        this.dryBeachLengthList = [];
      }
    },
    surfaceData(row) {
      this.surfaceDisplacementList = [];
      if (row.surfaceDisplacementList !== null) {
        this.surfaceDisplacementList = row.surfaceDisplacementList;
      } else {
        this.dryBeachLengthList = [];
      }
      this.surfaceDisplacementDialogVisible = true;
    },
    outerSlopeData(row) {
      this.outerSlopeRatioList = [];
      if (row.outerSlopeRatio !== null) {
        let ele = row.outerSlopeRatio.split(":");
        let obj = {};
        obj.testName = ele[1];
        obj.testData = ele[2];
        this.outerSlopeRatioList.push(obj);
      }
      this.outerSlopeDialogVisible = true;
    },
  },
};
</script>
<style scoped>
.content {
  margin-right: 5px;
  height: 87vh;
}
.list {
  height: 83vh;
}
.el-table-box {
  margin-top: 20px;
  margin-bottom: 20px;
  display: block;
  height: 73vh;
  overflow-y: auto;
}
table {
  text-align: center;
}
.el-table::before {
  z-index: inherit;
}
img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
img:hover {
  transform: scale(3, 3);
}
.imgNull {
  width: 70px;
  height: 70px;
}
</style>
